/*******************************************************************************
 * Copyright (c) 2011 - 2012 TXT e-solutions SpA
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * This work was performed within the IoT_at_Work Project
 * and partially funded by the European Commission's
 * 7th Framework Programme under the research area ICT-2009.1.3
 * Internet of Things and enterprise environments.
 *
 *
 * Authors:
 *     Cristoforo Seccia (TXT e-solutions SpA)
 *
 * Contributors:
 *      Domenico Rotondi (TXT e-solutions SpA)
 *******************************************************************************/
package it.txt.access.capability.revocation.wizard;

/**
 *
 * @author Cristoforo Seccia (TXT e-solutions SpA)
 */
public class WaitFrame extends javax.swing.JFrame {

    /**
     * 
     */
    private static final long serialVersionUID = -4554387353529918687L;
    /** Creates new form WaitFrame */
    public WaitFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        upperIoTLogoPanel = new javax.swing.JPanel();
        applicationLoadingProgressBar = new javax.swing.JProgressBar();
        upperIoTLogoLabel = new javax.swing.JLabel();
        applicationLoadingCreationlabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("bundles/SplashScreen"); // NOI18N
        setTitle(bundle.getString("title")); // NOI18N
        setBackground(new java.awt.Color(6, 136, 185));
        setUndecorated(true);

        jPanel1.setBackground(new java.awt.Color(42, 98, 210));

        upperIoTLogoPanel.setBackground(new java.awt.Color(255, 255, 255));
        upperIoTLogoPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        applicationLoadingProgressBar.setToolTipText(bundle.getString("progressBarToolTip")); // NOI18N
        applicationLoadingProgressBar.setStringPainted(true);

        upperIoTLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/IoT_logo.png"))); // NOI18N

        applicationLoadingCreationlabel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        applicationLoadingCreationlabel.setText(bundle.getString("progressLabel0")); // NOI18N

        javax.swing.GroupLayout upperIoTLogoPanelLayout = new javax.swing.GroupLayout(upperIoTLogoPanel);
        upperIoTLogoPanel.setLayout(upperIoTLogoPanelLayout);
        upperIoTLogoPanelLayout.setHorizontalGroup(
            upperIoTLogoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(upperIoTLogoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(upperIoTLogoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(applicationLoadingProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                    .addGroup(upperIoTLogoPanelLayout.createSequentialGroup()
                        .addComponent(applicationLoadingCreationlabel, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
                        .addGap(163, 163, 163))
                    .addComponent(upperIoTLogoLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        upperIoTLogoPanelLayout.setVerticalGroup(
            upperIoTLogoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, upperIoTLogoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(upperIoTLogoLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                .addComponent(applicationLoadingCreationlabel)
                .addGap(18, 18, 18)
                .addComponent(applicationLoadingProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(upperIoTLogoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(upperIoTLogoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    protected void setApplicationLoadingPercentage(int percentage) {
        applicationLoadingProgressBar.setValue(percentage);
    }

    protected void setApplicationLoadingInfo(String info) {
        applicationLoadingCreationlabel.setText(info);
    }

    protected void setApplicationLoadingIndeterminate(boolean value) {
        applicationLoadingProgressBar.setIndeterminate(value);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel applicationLoadingCreationlabel;
    private javax.swing.JProgressBar applicationLoadingProgressBar;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel upperIoTLogoLabel;
    private javax.swing.JPanel upperIoTLogoPanel;
    // End of variables declaration//GEN-END:variables

}
